#ifndef MYPIPE_H__
#define MYPIPE_H__


#define PIPESIZE 1024
#define PIPE_RD  0x00000001UL
#define PIPE_WR  0x00000002UL


typedef void mypipe_t*;

mypipe_t* mypipe_init(void);

int mypipe_register(mypipe_t* ptr,int optmap);
int mypipe_unregister(mypipe_t* ptr,int optmap);

int mypipe_read(mypipe_t* ptr,void* buf,size_t count);

int mypipe_write(mypipe_t* ptr,const void* buf,size_t count);

int mypipe_destroy(mypipe_t* ptr);

#endif

